Improve addons integration#2367
Closed
jubnzv wants to merge 18 commits into
Closed
Conversation
Extract class, add tests.
Collaborator
|
I did not look very closely but I like the idea. 👍 |
Contributor
Author
Ok. It takes some time to finish it. |
Collaborator
|
That is ok. It seems best to merge it after the release. |
5de0b6b to
eeb1e5d
Compare
versat
reviewed
Nov 21, 2019
| throwAddonError("Failed to open " + fileName); | ||
|
|
||
| picojson::value json; | ||
| fin >> json; |
Collaborator
There was a problem hiding this comment.
Do not forget to merge the fix adding json-parser error checking here ;)
Contributor
Author
There was a problem hiding this comment.
Thanks, I'll take a look at this. Really I'm waiting for next release, to merge master changes in my branch. And somehow fix windows build.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR improves current implementation of addons in cppcheck lib. Now we have separate class for addons configuration. That allows us write tests for addons functionality and makes it easier to add new features and handle errors.
For example, we can check environment (e.g. Python version/dependencies), handle errors related to json parsing (see #2362 (comment)) in one place.
My idea is use
addonsutils.cppto provide more utilities for addons integration and use it in both CLI and GUI. I'm currently working on GUI integration, so for now, leave this PR as draft.What do you think @danmar? Does these changes are acceptable?